"use strict";

const Controller = require("egg").Controller;

class UserController extends Controller {
    //查询所有数据
    async search() {
        const res = await this.service.user.search(); //定义查询
        this.ctx.body = {
            code: 200,
            data: res,
            msg: "查询成功",
        };
        return; //返回数据
    }
    //登录
    async login() {
        //解析请求体信息
        let { ctx } = this;
        let { pass, unm } = ctx.request.body;
    }
}

module.exports = UserController;
